<?php	
	/*
	echo __DIR__;echo '<hr/>';
	echo __FILE__;echo '<hr/>';
	echo __LINE__;echo '<hr/>';
	*/
	
	
	/*
	$a = 'abc1.1.1';
	$b = '1.1.1.abc';
	
	echo $a + $b; //自动转化
	echo '<hr/>',(float)$a,'<br/>',(float)$b;
	*/
	
	/*
	$a = 'abc1.1.1';
	$b = '1.1.1.abc';
	var_dump(is_int($a)); #bool(false) 
	var_dump(is_string($b));#bool(true)
	*/
	
	/*
	$a = 'abc1.1.1';
	$b = '1.1.1.abc';
	echo gettype($a); #string
	
	var_dump(settype($b,'int')); #bool(true)
	echo gettype($b); #integar
	
	*/
	
	
	/*
	$a1 = 120;		//10进制
	$a2 = 0b110;	    //2进制
	$a3 = 0120;		//8进制
	$a4 = 0x120;	    //16进制
	echo $a1,'<hr/>', $a2,'<hr/>', $a3,'<hr/>', $a4,'<hr/>';
	
	*/
	
	/*
	$f1 = 1.23;
	$f2 = 1.23e10;
	var_dump($f1,$f2); #float(1.23)  float(12300000000)
	*/
	
	/*
	$f1 = 0.7;
	$f2 = 2.1 / 3;
	var_dump($f1 == $f2); #bool(false)
	*/
	
	
	/*
	$a;
	var_dump(isset($a)); //bool(false)
	var_dump(empty($a)); //bool(true)
	
	$x = NULL;
	var_dump(isset($x)); //bool(false)
	var_dump(empty($x)); //bool(true)
	*/
	
	/*
	$a = 123; //整形
	$b = '123';//字符串
	var_dump($a == $b);  #bool(true) 
	var_dump($a === $b); #bool(false)
	
	*/
	
	/*
	$a = 'hello';
	$b = 'Mango';
	echo $a.$b; #helloMango
	
	echo '<hr/>';
	$a .= $b;
	echo $a; #helloMango
	*/
	
	/*
	$a = 10;
	$b = 0;
	@($a / $b); //如果没有错误抑制：报错Warning: Division by zero in D:\apache\htdocs\index.php on line 86

	*/
	/*
	$a = 0;
	$b = 0;
	echo $a++,'<br/>',++$b; // 0 1 
	echo '<br/>',$a,'<br/>',$b;// 1 1
	*/
	
	/*
	$a = 10;
	$b = 5;
	$a -= $b-1; //==>$a = $a - ($b-1)
	echo $a;//6
	*/

	// for($i = 0;$i <= 10;$i++)
	// 	echo " ".$i;

	display(20); //20hello Mango

	function display($val)
	{
		echo $val;
		echo "hello Mango";
	}

?>